<template>
	<view class="fixedbody">
		<view class="topInfo">
			<image :src="matchData.bgImgUrl" mode="aspectFill"></image>
		<!-- 	<text class="typeTag" v-if="matchData.type==0">独立赛</text> -->
			<view class="poMaskBox">
				<image class="logo" :src="matchData.logoUrl"></image>
				<view class="poMask">
					<view class="name">{{matchData.name}}</view>
					
				</view>
			</view>
			<view class="flexBox">
				<view class="p"><i class="iconfont icon-shijian"></i>比赛日期：{{matchData.beginTime?.substring(0, 10)}}至{{matchData.endTime?.substring(0, 10)}}</view>
			    <view class="p"><i class="iconfont icon--didian"></i>比赛地点：{{matchData.address}}</view>
			    <view class="p"  v-if="matchData.ocTelno" @click="makeCall(matchData.ocTelno)"><i class="iconfont icon-shumashouji"></i>联系电话：{{ matchData.ocTelno}}</view>
		        <view class="p flex"><i class="iconfont icon-jinggao"></i>相关条例：
				
				<view class="underLine mr10" @click="goWebView(matchData.signKnowUrlObj?.url)"
					v-if="matchData.signKnowUrlObj?.url">
				
					报名须知
				</view>
				<view class="underLine mr10" @click="goWebView(matchData.ruleUrlObj?.url)"
					v-if="matchData.ruleUrlObj?.url">
					竞赛规程
					
				</view>
				<view class="underLine" @click="goWebView(matchData.disclaimerUrlObj?.url)"
					v-if="matchData.disclaimerUrlObj?.url">
					
					免责声明
				</view>
				
				</view>
			</view>
             <view class="typeBox">
                <text class="typeTag typeTag1" >{{matchData.level}}</text>		
               <text class="typeTag ml20" >{{matchData.type==1?'联赛':'独立赛'}}</text>	
             </view>
			<view class="statusBox" hidden>
				<text
					class="time">报名时间：{{matchData.signBeginTime?.substring(0, 10)}}至{{matchData.signEndTime?.substring(0, 10)}}</text>
				<!-- 1 报名未开始 2 报名进行中 3 即将开始 4 进行中 5已经结束 -->
				<text class="status status01" v-if="matchData.progressStatusCode==3">即将开始</text>
				<text class="status status02" v-if="matchData.progressStatusCode==2">报名中</text>
				<text class="status status03" v-if="matchData.progressStatusCode==4">进行中</text>
				<text class="status status04" v-if="matchData.progressStatusCode==5">已结束</text>
				<text class="status status04" v-if="matchData.progressStatusCode==1">报名未开始</text>

			</view>
			<!-- <view class="statusBox" v-if="matchData.contactTelno" @click="makeCall(matchData.contactTelno)">
				<text class="time">联系电话： {{matchData.contactTelno}}</text>
			</view>
			<view class="statusBox">
				<text class="time">赛事级别： {{matchData.level}}</text>
			</view>
			<view class="statusBox">
				<text class="time">比赛地址： {{matchData.address}}</text>
			</view> -->
		</view>

		<view class="uni-padding-wrap uni-common-mt">
			<uni-segmented-control :current="current" :values="items" style-type="text" :active-color="activeColor"
				@clickItem="onClickItem" />
		</view>
		<view class="content">
			<view v-if="current === 0">
				<uni-card title="报名须知">
					<view>
						<view style="overflow: auto;">
							<view v-html="matchData.signKnow"></view>
						</view>
			

					</view>
				</uni-card>
				<uni-card title="组委会">
					<view v-if="matchData.ocOrganizer" class="flexss">
						<text>主办单位： </text>
						<view>
							<view v-for="(s,index) in matchData.ocOrganizer?.replace(/，/g,',').split(',')" :key="index">
								{{s}}
							</view>
						</view>
					</view>
					<view v-if="matchData.ocDeptName" class="flexss"><text>承办单位： </text>

						<view>
							<view v-for="(s,index) in matchData.ocDeptName?.replace(/，/g,',').split(',')" :key="index">
								{{s}}
							</view>
						</view>

					</view>
					<view v-if="matchData.ocSupportor" class="flexss"><text>支持单位： </text>
						<view>
							<view v-for="(s,index) in matchData.ocSupportor?.replace(/，/g,',').split(',')" :key="index">
								{{s}}
							</view>
						</view>

					</view>
					<view v-if="matchData.ocToDeptName" class="flexss"><text>协办单位： </text>
						<view>
							<view v-for="(s,index) in matchData.ocToDeptName?.replace(/，/g,',').split(',')"
								:key="index">{{s}}</view>
						</view>

					</view>
					<view v-if="matchData.operatingUnit" class="flexss"><text>运营单位： </text>
						<view>
							<view v-for="(s,index) in matchData.operatingUnit?.replace(/，/g,',').split(',')"
								:key="index">{{s}}</view>
						</view>

					</view>
					<view v-if="matchData.ocTelno"><text>组委会电话： </text>{{matchData.ocTelno}}</view>

				</uni-card>
				<uni-card title="项目介绍">
					<!-- <uni-list :border="false">
						<uni-list-item :title="item.name" clickable v-for="(item,index) in matchData.cptProjectList"
							:key="index" @click="popList(item)" :showArrow="item.hasNext=='1'"></uni-list-item>
					</uni-list> -->
					<uv-collapse accordion>
							<uv-collapse-item v-for="(item,index) in matchData.cptProjectList"
							:key="index" :title="item.name" :name="item.name">
								<view class="uv-collapse-content">									
									 <view v-for="g in item.cptGroupList" :key="g.id" class="duckBox">
									                           <p v-if="g.femaleLevelList?.length" rowspan="2" :class="g.maleLevelList?.length > 0||g.femaleLevelList?.length > 0?'duckTitle':'duckTitle marginTop'" >
									                              {{ g.name +'('+g.birthPeriod+')'}}
									                            </p>
									                            <p v-else :class="g.maleLevelList?.length > 0||g.femaleLevelList?.length > 0?'duckTitle':'duckTitle marginTop'" >{{ g.name +'('+g.birthPeriod+')'}}</p>
									                            <view v-if="g.commonList?.length > 0" class="duckTitle marginTop">
									                              <p class="mr15" v-for="(l, index) in g.commonList" :key="index">{{
									                                l.name
									                              }}</p>
									                            </view>
									                            <view v-if="g.maleLevelList?.length > 0||g.femaleLevelList?.length > 0" class="duckGroup marginBottom">
									                              <view v-if="g.maleLevelList?.length > 0" class="duckGroup-list">
									                                <uv-icon name="play-right-fill" color="#d43e3e" size="14"></uv-icon>
									                              <view class="duckGroup-list-title">男子组</view>
									                              <view class="flex">
									                              <p class="mr15" v-for="(l, index) in g.maleLevelList" :key="index">{{
									                                l.name
									                              }}</p>
									                            </view>
									                            </view >
									                          
									                            <view v-if="g.femaleLevelList?.length > 0" class="duckGroup-list">
									                               <uv-icon name="play-right-fill" color="#d43e3e" size="14"></uv-icon>
									                            <view class="duckGroup-list-title">女子组</view>
									                            <view class="flex">
									                              <p class="mr15"
									                                v-for="(l, index) in g.femaleLevelList"
									                                :key="index"
									                                >{{ l.name }}</p
									                              >
									                            </view>
									                           </view>
									                            </view> 
									 </view>
						   
								</view>
							</uv-collapse-item>
						</uv-collapse>
				</uni-card>

			</view>
			<view v-if="current === 2&&matchData.showJoinGroup=='1'">
				<view v-if="matchData.signType == '0'">
					<view class="team" v-for="(item,index) in signDoneGroupList" :key="index">
						<image mode="aspectFit" :src="item.avatar"></image>
						<text class="name">{{item.name}}</text>
					</view>
				</view>
				<view v-else>
					<view class="nowteamItem" v-for="(item,index) in signDoneGroupList" :key="index">
						<view>{{index+1}}.</view>
						<image mode="aspectFit" :src="item.imgUrl"></image>
						<view class="info">
							<text class="name">{{item.name}}</text>
							<view v-if="item.extraInfo" style="display: flex;">
								<text
									style="font-size: 24rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width: 240rpx;"
									v-for="(ee,index) in JSON.parse(item.extraInfo)" :key="index"
									v-show="(ee?.type == '0'||ee?.type == '4')&&index<2">
									{{ee.value}}&ensp;
								</text>
							</view>
						</view>
						<view class="rr"><text>{{item.renCi}}</text> 人参赛</view>
					</view>

				</view>


				<view class="nodata" v-if="(signDoneGroupList==null)||(signDoneGroupList.length==0)">
					<image mode="aspectFit" src="/static/nodata.png"></image>
					<text>还没有参赛队</text>
				</view>
			</view>
			<view v-if="current === 1">
				<view class="schedule" v-for="s in matchData.cptScheduleList" :key="s.id">
					<view class="time">
						<uni-icons type="calendar" size="18" color="#d43e3e"></uni-icons>
						{{ s.timeRange?.split(',')[0].substring(0, 16) }}
						~
						{{ s.timeRange?.split(',')[1].substring(0, 16) }}
					</view>
					<view>{{s.name}}</view>
					<view class="title" v-html="s.introduction"></view>
					<view class="place">
						<uni-icons type="location" size="15"></uni-icons>
						{{s.address}}
					</view>
				</view>
				<view class="nodata" v-if="matchData.cptScheduleList.length==0">
					<image mode="aspectFit" src="/static/nodata.png"></image>
					<text>还没有日程</text>
				</view>
			</view>
			<view v-if="current === 3&&cptLabelsList.length>0" class="cardBox">
				<uni-card>
					<view class="richContent" v-html="cptLabelsList[0].customText"></view>
					<view class="underLine" @click="goWebView(cptLabelsList[0].fileObj.url)"
						v-if="cptLabelsList[0].fileUrl">
						<uni-icons type="download" size="16"></uni-icons>
						{{cptLabelsList[0]?.fileObj?.name}}
					</view>
				</uni-card>
			</view>
			<view v-if="current === 4&&cptLabelsList.length>1" class="cardBox">
				<uni-card>
					<view class="richContent" v-html="cptLabelsList[1].customText"></view>
					<view class="underLine" @click="goWebView(cptLabelsList[1].fileObj.url)"
						v-if="cptLabelsList[1].fileUrl">
						<uni-icons type="download" size="16"></uni-icons>
						{{cptLabelsList[1]?.fileObj?.name}}
					</view>
				</uni-card>
			</view>
		</view>
		<view class="fixedBottom bottomFixed">
			<text style="font-size: 28rpx;">{{matchData.signBeginTime?.substring(0, 10)}} 至
				{{matchData.signEndTime?.substring(0, 10)}}</text>
			<!-- 1 报名未开始 2 报名进行中 3 即将开始 4 进行中 5已经结束 -->
			<text class="orange" v-if="matchData.progressStatusCode=='1'">报名未开始</text>
			<text class="orange"
				v-if="matchData.progressStatusCode=='3'||matchData.progressStatusCode=='4'||matchData.progressStatusCode=='5'">
				报名已结束
			</text>
			<view v-if="matchData.progressStatusCode=='2'">
				<text class="orange" @click="goSign(matchData)" v-if="matchData.signInfoStatus=='2'">已报名</text>
				<button style="width: auto;" class="btn btn1" @click="goSign(matchData)" v-else>我要报名</button>
			</view>

		</view>
		<!-- 项目-组别-级别 弹出 -->
		<uni-popup ref="popup" type="bottom" background-color="#fff">
			<view class="vh80">
				<uni-collapse>
					<uni-collapse-item v-for="(item,index) in groupList" :show-animation="false" :key="index"
						:name="index" :show-arrow="false" :border="false" title-border="none" :open="item.hasNext=='1'">
						<template v-slot:title>
							<view class="levelTitle">{{item.name}}
							</view>
						</template>
						<view v-if="item.commonList?.length>0">
							<text v-for="t in item.commonList" class="levelItem" :key="t.id">{{t.name}}</text>
						</view>
						<uni-section class="mt-30" title="男子组" type="line" v-if="item.maleLevelList?.length>0">
							<text v-for="t in item.maleLevelList" class="levelItem" :key="t.id">{{t.name}}</text>
						</uni-section>
						<uni-section class="mt-30" title="女子组" type="line" v-if="item.femaleLevelList?.length>0">
							<text v-for="t in item.femaleLevelList" class="levelItem" :key="t.id">{{t.name}}</text>
						</uni-section>
					</uni-collapse-item>
				</uni-collapse>
			</view>
		</uni-popup>

		<!-- 选择团队 -->
		<uni-popup ref="popupGroupList" type="bottom" background-color="#fff">
			<view class="chooseGroup">
				<view class="t">请选择参赛队</view>
				<view class="list">
					<uni-list :border="false">
						<uni-list-item v-for="(item,index) in groups" :key="index" clickable
							@click="getThisGroupId(item)" :title="item.name" :note="item.typeStr" showArrow
							:thumb="item.imgUrl" thumb-size="lg" />
					</uni-list>

					<view @click="goAddgroup()"><uni-icons type="plusempty" size="20" color="#d43e3e"></uni-icons>新建参赛队
					</view>
				</view>

			</view>
		</uni-popup>

		<uni-popup class="popYanZhengBox" ref="popYanZheng" type="center">
			<view class="popup-content">
				<view class="t">温馨提示</view>
				<view class="p">该微信未绑定系统内手机号，绑定手机号后正常使用。</view>
				<button class="start" type="default" open-type="getPhoneNumber"
					@getphonenumber="decryptPhoneNumber">绑定手机号</button>
			</view>
		</uni-popup>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive,
		toRefs,
		getCurrentInstance
	} from 'vue';
	import * as match from '@/common/match.js';
	import {
		getWxUserPhone
	} from '@/common/login.js';
	import * as loginServer from '@/common/login.js';
	import {
		onLoad,
		onShow,
		onShareAppMessage,
		onShareTimeline
	} from '@dcloudio/uni-app';
	const app = getApp();
	const data = reactive({
		items: ['首页', '日程'],
		current: 0,
		activeColor: '#00CAA6',
		projectList: [],
		groupList: [],
		levelList: [],
		levelListGirl: [],
		levelListBoy: [],
		popup: null,
		popupGroupList: null,
		groupListArr: [],
		matchId: 0,
		matchData: {},
		groups: [],
		groupId: '',
		signDoneGroupList: [],
		cptLabelsList: []
	})
	const {
		items,
		current,
		activeColor,
		projectList,
		groupList,
		levelList,
		popup,
		popupGroupList,
		groupListArr,
		matchId,
		groups,
		matchData,
		groupId,
		signDoneGroupList,
		levelListGirl,
		levelListBoy,
		cptLabelsList
	} = toRefs(data);
	const popYanZheng = ref(null);
	const loading = ref(false);
	// 分享
	onLoad(option => {
		if (option.id) {
			matchId.value = option.id
		}
		if (option.scene) {
			matchId.value = decodeURIComponent(option.scene);
		}
	})
	onShow(option => {
		if (app.globalData.isLogin) {
			getMatch(matchId.value)
		} else {
			app.firstLoadCallback = () => {
				getMatch(matchId.value)
			};
		}
	})

	function getMyGroupList() {
		match.getMyGroupList().then(res => {
			groups.value = res.data
		})
	}

	function getMatch(id) {
		match.getMatchById({
			id: id
		}).then(res => {
			matchData.value = res.data
			app.globalData.coachOrLeaderFlag = res.data.coachOrLeaderFlag
			app.globalData.chargeFlag = res.data.chargeFlag
			app.globalData.noPhotoCanSign = res.data.noPhotoCanSign
			if (matchData.value.signType == 1 || matchData.value.signType == 2) {
				getMyGroupList()
			}
			if (matchData.value.signKnowUrl && matchData.value.signKnowUrl != 'null') {
				matchData.value.signKnowUrlObj = JSON.parse(matchData.value.signKnowUrl)[0]
			}
			if (matchData.value.ruleUrl && matchData.value.ruleUrl != 'null') {
				matchData.value.ruleUrlObj = JSON.parse(matchData.value.ruleUrl)[0]
			}
			if (matchData.value.disclaimerUrl && matchData.value.disclaimerUrl != 'null') {
				matchData.value.disclaimerUrlObj = JSON.parse(matchData.value.disclaimerUrl)[0]
			}
			if (res.data.showJoinGroup == '1') {
				if (matchData.value.signType == 0) {
					if (items.value.indexOf('参赛人员') == -1) {
						items.value.push('参赛人员')
					}
				} else {
					if (items.value.indexOf('参赛队') == -1) {
						items.value.push('参赛队')
					}
				}
			}
			if (res.data.cptLabels && cptLabelsList.value.length == 0) {
				cptLabelsList.value = res.data.cptLabels
				for (let c of cptLabelsList.value) {
					items.value.push(c.customTitle)
					c.customText = c.customText?.replace(/\<img/gi, '<img style="width:100%";height:auto')
					if (c.fileUrl) {
						c.fileObj = JSON.parse(c.fileUrl)[0]
					}
				}
			}
		}).then(() => {
			getGroupListByCptId(id)
		})
	}

	function getGroupListByCptId(id) {
		match.getGroupListByCptId(id).then(res => {
			signDoneGroupList.value = res.data
		})
	}

	function onClickItem(e) {
		current.value = e.currentIndex
	}

	function getThisGroupId(item) {
		groupId.value = item.id
		checkIsSign(item.signType).then(() => {
			goSignType2()
		})
	}
	// 获取已报信息
	function checkIsSign(type) {
		var obj = {
			cptId: matchId.value
		}
		if (matchData.value.signType == '0') {
			obj.groupId = ''
		} else {
			obj.groupId = groupId.value
		}
		return match.getMySignInfo(obj).then(res => {
			if (res.data.type == '1') {
				let str = ''
				if (type == "0") {
					str = '已报名，不能重复报名'
				} else {
					str = '该参赛队已报名，请选择其他参赛队'
				}
				uni.showModal({
					title: '提示',
					content: str,
					showCancel: false,
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
						}
					}
				});
				return Promise.reject("rejected message")
			}
		})
	}
	
	let goPath
	let currUser
	function checkUserPhone(path) {
		console.log('hah')
		currUser = uni.getStorageSync('currUser')
		if (!currUser) {
			loginServer.pcLogin().then(() => {
				currUser = uni.getStorageSync('currUser')
				if (currUser.phonenumber) {
					debugger
					return true
				} else {
					popYanZheng.value.open()
					goPath = path
					return false;
				}
			});
		} else {
			if (currUser.phonenumber) {
				return true
			} else {
				popYanZheng.value.open()
				goPath = path
				return false;
			}
		}
	}

	function goSign(item) {
		if (item.signType == '0') {
			// 个人报名
			checkIsSign(item.signType).then((res) => {
				let path =
					`/pages_match/match/sign_single?matchId=${item.id}&participantsInfo=${item.participantsInfo}`;
				if (checkUserPhone(path)) {
					uni.navigateTo({
						url: path
					});
				}
			})
		} else if (item.signType == '1' || item.signType == '2') {
			// 团队报名 团体-队伍报名		
			if (groups.value && groups.value.length > 0) {
				popupGroupList.value.open()
			} else {
				groupId.value = 0
				goSignType2()
			}
		}
	}

	function goSignType2() {
		let path =
			`/pages/usercenter/teamInfo?matchId=${matchId.value}&groupId=${groupId.value}&signType=${matchData.value.signType}&participantsInfo=${encodeURIComponent(matchData.value.groupInfo||'')}`;
		if (checkUserPhone(path)) {
			uni.navigateTo({
				url: path
			});
		}
	}

	function goAddgroup() {
		let path = `/pages/usercenter/teamInfo?matchId=${matchId.value}&signType=${matchData.value.signType}`;
		if (checkUserPhone(path)) {
			uni.navigateTo({
				url: path
			});
		}
	}

	function makeCall(num) {
		uni.makePhoneCall({
			phoneNumber: num
		});
	}

	function popList(item) {
		console.log(item)
		if (item.hasNext == "0") {
			return
		}
		popup.value.open()
		groupList.value = item.cptGroupList
	}

	function goWebView(url) {
		uni.showLoading({
			title: '下载中'
		});
		uni.downloadFile({
			url: url,
			success: function(res) {
				uni.hideLoading();
				var filePath = res.tempFilePath;
				uni.showLoading({
					title: '正在打开'
				});
				uni.openDocument({
					filePath: filePath,
					showMenu: true,
					success: function(res) {
						uni.hideLoading();
					},
					fail: function(err) {
						uni.hideLoading();
						uni.showToast({
							title: err,
							icon: 'none',
							duration: 2000
						});
					}
				});
			},
			fail: function(error) {
				uni.hideLoading();
				uni.showToast({
					title: `下载失败`,
					icon: 'none',
					duration: 2000
				});
			}
		});

	}
	function decryptPhoneNumber(res) {
		// console.log(res)
		loading.value = true
		if (res.detail.errMsg.indexOf('ok') > -1) {
			getWxUserPhone(res.detail).then((data) => {
				console.log(data)
				popYanZheng.value.close()
				uni.navigateTo({
					url: goPath
				})
			}).finally(() => {
				loading.value = false
			});
		} else {
			loading.value = false
		}
	}
</script>

<style scoped lang="scss">
	.topInfo {
		background: #fff;
		position: relative;
		padding: 25rpx;
	}

	.topInfo>image {
		width: 700rpx;
		height: 394rpx;
		background: #fff;
		border-radius: 15rpx;
		display: block;
		margin: auto;    //filter: brightness(0.6);
	}
    .topInfo .typeBox{
		width:700rpx;
		height:46rpx;
		position: absolute;
		top: 373rpx;
		left: 25rpx;
		border-bottom-left-radius: 15rpx;
		border-bottom-right-radius: 15rpx;
		background:rgba(0,0,0,0.5);
		display: flex;
		justify-content: flex-end;
		.typeTag {
			color: #FFFFFF;
			background: #FF8124;
			font-size: 24rpx;
			color: #FFFFFF;
			border-radius: 15rpx 0rpx 15rpx 0rpx;
			padding: 6rpx 14rpx;
		}
		.typeTag1{
			background:$uni-color-primary;
		}
	}
	

	.name {
		font-size: 32rpx;
		color: #000000;
		margin: 36rpx 0 18rpx;
		text-align: left!important;
	}

	.statusBox {
		.status {
			border-radius: 16rpx 16rpx 16rpx 0rpx;
			font-size: 20rpx;
			color: #FFFFFF;
			padding: 4rpx 15rpx;
			margin: 0 15rpx 0 0;
		}

		.status01 {
			background: linear-gradient(270deg, rgba(254, 164, 73, 1), rgba(255, 185, 95, 1));
		}

		.status02 {
			background: linear-gradient(270deg, #e1a2a2, $uni-color-primary);
		}

		.status03 {
			background: linear-gradient(270deg, rgba(190, 142, 251, 1), rgba(167, 109, 244, 1));
		}

		.status04 {
			background: linear-gradient(270deg, #D9D9D9, #BCBCBC);
		}

		.time {
			color: #7B7F83;
			font-size: 26rpx;
		}
	}
	.team {
		width: 700rpx;
		background: #FFFFFF;
		border-radius: 15rpx;
		height: 130rpx;
		margin: 20px auto 0;
		display: flex;
		align-items: center;
	}
    .nowteamItem {
    		width: 700rpx;
    		background: #FFFFFF;
    		border-radius: 15rpx;
    		height: 130rpx;
    		padding: 0 15px;
    		box-sizing: border-box;
    		margin: 20px auto 0;
    		display: flex;
    		align-items: center;
    
    		image {
    			width: 100rpx;
    			height: 100rpx;
    			margin: 10rpx 30rpx;
    		}
    
    		.rr {
    			text-align: right;
    			flex: 1;
    			font-size: 28rpx;
    
    			text {
    				color: $uni-color-primary
    			}
    		}
    
    		.info {
    			.name {
    				color: #000000;
    				font-size: 30rpx;
    				width: 40vw;
    				overflow: hidden;
					
    				white-space: nowrap;
    				text-overflow: ellipsis;
    				display: block;
    				margin: 0;
    			}
    
    			view {
    				font-size: 28rpx;
    				color: $uni-color-primary;
    				margin: 10rpx 0 0;
    			}
    		}
    	}
	.team image {
		width: 100rpx;
		height: 100rpx;
		margin: 10rpx 30rpx;
		border-radius: 50%;
	}

	.team .name {
		color: #000000;
		font-size: 30rpx;
		margin: 0;
	}

	.schedule {
		width: 700rpx;
		background: #fff;
		padding: 25rpx;
		border-radius: 15rpx;
		margin: 30rpx 20rpx 0;
		box-sizing: border-box;
	}

	.schedule .time {
		font-size: 28rpx;
		color: $uni-color-primary;margin: 0 0 10rpx;
	}

	.schedule .time image {
		width: 28rpx;
		height: 28rpx;
	}
	 .matchItem .rightWen{
		 display: flex;
		 flex-direction: column;
		 justify-content: space-between;
	 }
    .matchItem .rightWen .name{
		margin:0;
		font-weight: bold;
	}

	.schedule .title {
		color: #2B3133;
		font-size: 30rpx;
	}
	.schedule img{max-width: 100%;}
	.schedule .place {
		font-size: 28rpx;
		color: #7B7F83;
	}

	.pd20 {
		padding: 20px;
	}

	.chooseGroup {
		padding: 40rpx;

		.t {
			text-align: center;
			margin: 0 0 30rpx;
			font-size: 34rpx;
			color: #999;
		}

		.list {
			view {
				margin: 20rpx 0 0;
				color: $uni-color-primary;
				text-align: center;
				border: 1px solid $uni-color-primary;
				border-radius: 41rpx;
				padding: 16rpx 30rpx;
			}
		}
	}

	:deep(.uni-list-item__container) {
		padding-left: 0 !important;
	}

	:deep(.uni-icon-wrapper) {
		padding-left: 0 !important;
	}

	:deep(.uni-collapse-item) {
		margin: 0 !important;
		border-bottom: 1px solid #e1e1e1;
		border-radius: 0;
	}

	.levelTitle {
		text {
			float: right;
			font-size: 28rpx;
			color: #999;
		}

	}

	.levelItem {
		background: #eee;
		padding: 10rpx 20rpx;
		margin: 20rpx 20rpx 0 0;
		display: inline-block;
		border-radius: 6rpx;
	}

	.vh50 {
		height: 50vh;
		overflow: auto;
	}

	.mt-30 {
		margin-top: 30rpx;
	}

	:deep(.uni-section .uni-section-header) {
		padding: 12px 0 0 !important;
	}

	.richContent {
		line-height: 1.6;overflow: auto;

		img {
			max-width: 100%;
		}
	}

	.fixedBottom button {
		margin: auto;
		background:#fff;
		color:$uni-color-primary;
	}
    .bottomFixed{
		justify-content: space-around;
		align-items: baseline;
		height:100rpx;
		background:$uni-color-primary;
		color:#fff;
	}
	.matchItem{background: #fff;display: flex;}
	.poMaskBox{
		width: 100%; 
		display: flex;
		align-items: center;
		margin: 20rpx 0;
		// position: absolute;top: 0;left: 0;
		.logo{width: 50px;height: 50px;border-radius:50%;background-color: #FFF;}
		.poMask{
			 text-align:left;
			 .name{font-size: 32rpx;font-weight: bold;margin:0}
			 
			 .p{font-size: 24rpx;}
	     }
		
	}
	.flexss {
		display: flex;
	}
	.uni-padding-wrap{padding: 0;
	 background:linear-gradient(90deg, #dbada5, $uni-color-primary);
	
	}
	:deep(.segmented-control){
		justify-content: space-around;
	}
	:deep(.segmented-control__item){
		 
		flex:none!important;
		justify-content: space-between;
		 .segmented-control__text{
			  color:#fff!important;
		 }
		 .segmented-control__item--text{
		 			  border:none;
		 			  color:$uni-color-primary!important;
					  background:#fff;
					  font-weight: bold;
					  border-radius:10px;
					  padding:5rpx 10rpx;
		 }
	 }
	.underLine {
		text-decoration: underline;color: $uni-color-primary!important;
	}
	.flexBox{
		padding:0 20rpx;
		.p{
			color:#747474;
			display:flex;
			justify-content: flex-start;
			align-items: center;
			line-height:50rpx;
			.iconfont{
				margin-right:15rpx;
			}
		}
	}
	:deep(.uni-card){
		.uni-card__header{
			position:relative;
			border:none;
			&::before {
			        position: absolute; /*绝对定位*/
			        top: 50%; /*Y轴方向偏移自身高度的50%*/
			        transform: translatey(-40%); /*Y轴方向偏移微调*/
			        left:0; /*紧靠容器左边缘*/
			        content: ''; /*伪元素需要有内容才能显示*/
			        width: 3px; /*伪元素宽度*/
			        height: 17px; /*伪元素高度*/
			        background-color: $uni-color-primary; /*伪元素颜色*/
			
			     }
		}
		.uni-card__content{
			border:1px solid  $uni-color-primary;
			margin-bottom:20rpx;
		}
			 
	}
	.matchItem .rightWen .time{
		margin:0!important;
	}

	.underLine {
		text-decoration: underline;
		color: #54E1B9;
	}

	.flexss {
		display: flex;
	}

	.popYanZhengBox {
			text-align: center;
	
			.popup-content {
				width: 550rpx;
				height: 450rpx;
				box-sizing: border-box;
				background: #FFFFFF;
				border-radius: 15rpx;
			}
	
			.t {
				font-weight: 500;
				font-size: 34rpx;
				color: #7B7F83;
			}
	
			.p {
				line-height: 1.8;
				font-size: 30rpx;
				color: #1A1A1A;
				margin-top: 50rpx;
			}
	
			button {
				width: 268rpx;
				height: 80rpx;
				color: #FFFFFF;
				font-size: 32rpx;
				border: none;
				background: linear-gradient(270deg, #e17572, $uni-color-primary);
				border-radius: 40rpx;
				margin-top: 60rpx;
			}
		}
		
		
		
		.flexBottom{
			background:$uni-color-primary!important;
			height:130rpx!important;
		}
		.marginBottom{
		  margin-bottom:10px!important;
		}
		.marginTop{
		  margin-top:10px!important;
		}
		.duckTitle{
		  width:100%;
		  box-sizing: border-box;
		  background:$uni-color-primary;
		  color:#fff!important;
		  border-radius: 2px;
		  text-align:center;
		  padding:15px;
		}
		.duckBox p{
		  margin:0;
		}
		.duckGroup{
			box-sizing: border-box;
		  border:1rpx solid $uni-color-primary;
		  border-top:none;
		}
		.duckGroup-list{
			box-sizing: border-box;
		  display:flex;
		  padding:20rpx 15rpx;
		  border-bottom:1px solid #f6f6f6e5;
		  justify-content: flex-start;
		  align-items: center;
		  .flex{
			  flex-wrap: wrap;
			  flex:1;
		  }
		  .duckGroup-list-title{
			   width:90rpx!important;
		    display: flex;
			flex-wrap: nowrap;
		    margin-right:10rpx;
		    padding:0 10rpx;
		    border-right:4rpx solid #ddd;
		  }
		}
		:deep(.uv-collapse-item__content__text){
			padding:0!important;
		}
		.cardBox{
			:deep(.uni-card){
				padding-top:20rpx!important;
			}
		}
</style>